﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using bi4homev3.Entidades;
using bi4homev3.Logica;

namespace bi4homev3.Paginas
{
    public partial class CambioClave : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["validar"].Equals("false"))
            {
                Response.Redirect("NuevoPerfil.aspx");
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Usuario cambio = new Usuario();
            cambio.Clave = this.pass.Text;
            cambio.Login = (string)(Session["usuario"]);
            AccionesPerfil cambios = new AccionesPerfil(cambio);
            cambios.cambiarClave();
            this.Button1.Enabled = false;
            this.RESPUESTA.Text = "El cambio de Clave se realizo con EXITO";
        }

    }
}
